// components/dd-card-detl/index.js
Component({

  /**
   * 组件的属性列表
   */
  properties: {
    DotStyle: {type: Boolean, value: true},
    isCard: {type: Boolean, value: true},
    imgUrl: {type: String, value: 'https://image.meiye.art/FlqKg5bugFQD5Qzm_QhGM7ET4Mtx?imageMogr2/thumbnail/450x/interlace/1'},
    isShowSwiper: {type: Boolean, value: false},
    swiperList: {type: Array, value: []},
    cardText: {type: String, value: ''},
    cardUserUrl: {type: String, value: ''},
    cardTextGrey: {type: String, value: ''},
    cardText1: {type: String, value: ''},
  },

  /**
   * 组件的初始数据
   */
  data: {

  },

  /**
   * 组件的方法列表
   */
  methods: {
    onClickGrey() {
      this.triggerEvent('clickGrey', {})
    },
    onClickImage(event) {
      const url = event.currentTarget.dataset.operation;
      const urls = [];
      for (const swiper of this.data.swiperList) {
        if (swiper.type == 'image') {
          urls.push(swiper.url);
        }
      }
      this.triggerEvent('clickImage', {url: url, urls: urls})
    },
  }
})